﻿using System.Windows.Controls;
using Multi_protocol_upper_computer.ViewModels;

namespace Multi_protocol_upper_computer.Views
{
    public partial class CommunicationView : UserControl
    {
        public CommunicationView(CommunicationViewModel viewModel)
        {
            InitializeComponent();

            // 设置DataContext为CommunicationViewModel实例
            // 这样XAML中的绑定才能正常工作
            DataContext = viewModel ?? throw new System.ArgumentNullException(nameof(viewModel));
        }
    }
}
